Skip to content

[llvm-profgen] Read build ID from binary for perfscript address filtering#190862

Merged
aaupov merged 4 commits intomainfrom
users/aaupov/spr/llvm-profgen-read-build-id-from-binary-for-perfscript-address-filtering-6
Apr 9, 2026
Merged

[llvm-profgen] Read build ID from binary for perfscript address filtering#190862
aaupov merged 4 commits intomainfrom
users/aaupov/spr/llvm-profgen-read-build-id-from-binary-for-perfscript-address-filtering-6

Conversation

@aaupov
Copy link
Copy Markdown
Contributor

@aaupov aaupov commented Apr 7, 2026

For shared libraries (.so), read the binary's build ID during load()
using object::getBuildID() and store it as FilterBuildID. Main
executables keep FilterBuildID empty, matching the convention that
their perfscript addresses have no buildid prefix.

This enables automatic build ID-based filtering of perfscript
addresses in [buildid:]0xaddr format without requiring a CLI option.

Created using spr 1.3.4
@aaupov aaupov requested review from HighW4y2H3ll and apolloww April 7, 2026 22:27
@aaupov aaupov marked this pull request as ready for review April 7, 2026 22:27
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Apr 7, 2026
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Apr 7, 2026

@llvm/pr-subscribers-pgo

Author: Amir Ayupov (aaupov)

Changes

For shared libraries (.so), read the binary's build ID during load()
using object::getBuildID() and store it as FilterBuildID. Main
executables keep FilterBuildID empty, matching the convention that
their perfscript addresses have no buildid prefix.

This enables automatic build ID-based filtering of perfscript
addresses in [buildid:]0xaddr format without requiring a CLI option.


Full diff: https://github.com/llvm/llvm-project/pull/190862.diff

2 Files Affected:

  • (modified) llvm/tools/llvm-profgen/ProfiledBinary.cpp (+11)
  • (modified) llvm/tools/llvm-profgen/ProfiledBinary.h (+9)
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
index 915e991e4068c..f6be04a4790fd 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
@@ -11,6 +11,7 @@
 #include "MissingFrameInferrer.h"
 #include "Options.h"
 #include "ProfileGenerator.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDB.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
@@ -246,6 +247,16 @@ void ProfiledBinary::load() {
   // Find the preferred load address for text sections.
   setPreferredTextSegmentAddresses(Obj);
 
+  // For shared libraries, read build ID to filter perfscript addresses
+  // in [buildid:]addr format. Main executables use empty FilterBuildID
+  // since their addresses have no buildid prefix.
+  StringRef FileName = llvm::sys::path::filename(Path);
+  if (FileName.ends_with(".so") || FileName.contains(".so.")) {
+    auto BID = object::getBuildID(Obj);
+    if (!BID.empty())
+      FilterBuildID = llvm::toHex(BID, /*LowerCase=*/true);
+  }
+
   // Load debug info of subprograms from DWARF section.
   // If path of debug info binary is specified, use the debug info from it,
   // otherwise use the debug info from the executable binary.
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.h b/llvm/tools/llvm-profgen/ProfiledBinary.h
index 16218d430d78c..d5ad61d870770 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.h
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.h
@@ -28,6 +28,7 @@
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCTargetOptions.h"
+#include "llvm/Object/BuildID.h"
 #include "llvm/Object/ELFObjectFile.h"
 #include "llvm/ProfileData/SampleProf.h"
 #include "llvm/Support/CommandLine.h"
@@ -337,6 +338,11 @@ class ProfiledBinary {
 
   bool IsCOFF = false;
 
+  // Build ID used to filter perfscript addresses in [buildid:]addr format.
+  // For shared libraries, set to the binary's build ID.
+  // For main executables, kept empty (addresses have no buildid prefix).
+  std::string FilterBuildID;
+
   void setPreferredTextSegmentAddresses(const object::ObjectFile *O);
 
   // LLVMSymbolizer's symbolize{Code, Data} interfaces requires a section index
@@ -425,6 +431,9 @@ class ProfiledBinary {
 
   bool isCOFF() const { return IsCOFF; }
 
+  // Return the build ID used for filtering perfscript addresses.
+  StringRef getFilterBuildID() const { return FilterBuildID; }
+
   // Canonicalize to use preferred load address as base address.
   uint64_t canonicalizeVirtualAddress(uint64_t Address) {
     return Address - BaseAddress + getPreferredBaseAddress();

Created using spr 1.3.4
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

✅ With the latest revision this PR passed the C/C++ code formatter.

Created using spr 1.3.4
Copy link
Copy Markdown
Member

@HighW4y2H3ll HighW4y2H3ll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Created using spr 1.3.4
@aaupov aaupov merged commit 80ae4e5 into main Apr 9, 2026
10 checks passed
@aaupov aaupov deleted the users/aaupov/spr/llvm-profgen-read-build-id-from-binary-for-perfscript-address-filtering-6 branch April 9, 2026 22:50
@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building llvm at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/26233

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
-- Performing Test LIBC_CC_SUPPORTS_PATTERN_INIT - Success
-- Performing Test LIBC_CC_SUPPORTS_NOSTDLIBPP
-- Performing Test LIBC_CC_SUPPORTS_NOSTDLIBPP - Success
-- Performing Test LIBC_CC_SUPPORTS_NOSTDLIBINC
-- Performing Test LIBC_CC_SUPPORTS_NOSTDLIBINC - Success
-- Integration test for hdrgen added.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-amdgcn-amd-amdhsa-bins
36.149 [11/2/4895] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib:"  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder amdgpu-offload-build-only running on AMD-bb-w-01 while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/226/builds/3606

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[8511/8557] Creating library symlink lib/libFortranLower.so
[8512/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o
[8513/8557] Linking CXX executable bin/fir-opt
[8514/8557] Linking CXX shared library lib/libflangFrontend.so.23.0git
[8515/8557] Creating library symlink lib/libflangFrontend.so
[8516/8557] Linking CXX shared library lib/libflangFrontendTool.so.23.0git
[8517/8557] Creating library symlink lib/libflangFrontendTool.so
[8518/8557] Linking CXX executable bin/tco
[8519/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8520/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /opt/rh/gcc-toolset-13/root/usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-build-only/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-build-only/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  -lpthread  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-build-only/build/lib && :
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: /home/botworker/bbot/amdgpu-offload-build-only/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8521/8557] Linking CXX executable bin/flang-23
[8522/8557] Linking CXX executable bin/bbc
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[8511/8557] Creating library symlink lib/libFortranLower.so
[8512/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o
[8513/8557] Linking CXX executable bin/fir-opt
[8514/8557] Linking CXX shared library lib/libflangFrontend.so.23.0git
[8515/8557] Creating library symlink lib/libflangFrontend.so
[8516/8557] Linking CXX shared library lib/libflangFrontendTool.so.23.0git
[8517/8557] Creating library symlink lib/libflangFrontendTool.so
[8518/8557] Linking CXX executable bin/tco
[8519/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8520/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /opt/rh/gcc-toolset-13/root/usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-build-only/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-build-only/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  -lpthread  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-build-only/build/lib && :
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: /home/botworker/bbot/amdgpu-offload-build-only/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8521/8557] Linking CXX executable bin/flang-23
[8522/8557] Linking CXX executable bin/bbc
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=70.881285

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/43007

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[8490/8557] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
[8491/8557] Creating library symlink lib/libFIROpenACCSupport.so
[8492/8557] Linking CXX shared library lib/libFIROpenACCAnalysis.so.23.0git
[8493/8557] Creating library symlink lib/libFIROpenACCAnalysis.so
[8494/8557] Linking CXX shared library lib/libFIRTestOpenACCInterfaces.so.23.0git
[8495/8557] Creating library symlink lib/libFIRTestOpenACCInterfaces.so
[8496/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8497/8557] Linking CXX shared library lib/libFIROpenACCTransforms.so.23.0git
[8498/8557] Creating library symlink lib/libFIROpenACCTransforms.so
[8499/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8500/8557] Linking CXX shared library lib/libFIRCodeGen.so.23.0git
[8501/8557] Linking CXX shared library lib/libFlangOpenMPTransforms.so.23.0git
[8502/8557] Linking CXX executable bin/fir-lsp-server
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[8490/8557] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
[8491/8557] Creating library symlink lib/libFIROpenACCSupport.so
[8492/8557] Linking CXX shared library lib/libFIROpenACCAnalysis.so.23.0git
[8493/8557] Creating library symlink lib/libFIROpenACCAnalysis.so
[8494/8557] Linking CXX shared library lib/libFIRTestOpenACCInterfaces.so.23.0git
[8495/8557] Creating library symlink lib/libFIRTestOpenACCInterfaces.so
[8496/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8497/8557] Linking CXX shared library lib/libFIROpenACCTransforms.so.23.0git
[8498/8557] Creating library symlink lib/libFIROpenACCTransforms.so
[8499/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8500/8557] Linking CXX shared library lib/libFIRCodeGen.so.23.0git
[8501/8557] Linking CXX shared library lib/libFlangOpenMPTransforms.so.23.0git
[8502/8557] Linking CXX executable bin/fir-lsp-server
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=73.157838

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder hip-third-party-libs-test running on ext_buildbot_hw_05-hip-docker while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/206/builds/17415

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py --jobs=32' (failure)
...
[8484/8557] Linking CXX shared library lib/libFIRBuilder.so.23.0git
[8485/8557] Creating library symlink lib/libFIRBuilder.so
[8486/8557] Linking CXX shared library lib/libFIROpenMPSupport.so.23.0git
[8487/8557] Creating library symlink lib/libFIROpenMPSupport.so
[8488/8557] Linking CXX shared library lib/libFortranUtils.so.23.0git
[8489/8557] Creating library symlink lib/libFortranUtils.so
[8490/8557] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
[8491/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8492/8557] Creating library symlink lib/libFIROpenACCSupport.so
[8493/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/hip-third-party-libs-test/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/hip-third-party-libs-test/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8494/8557] Linking CXX shared library lib/libFIROpenACCAnalysis.so.23.0git
[8495/8557] Linking CXX shared library lib/libFIRTestOpenACCInterfaces.so.23.0git
[8496/8557] Linking CXX shared library lib/libFIRCodeGen.so.23.0git
[8497/8557] Linking CXX shared library lib/libFlangOpenMPTransforms.so.23.0git
[8498/8557] Linking CXX executable bin/fir-lsp-server
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 107, in step
    yield
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 44, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 120, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/hip-third-party-libs-test/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP update llvm-test-suite@@@
@@@HALT_ON_FAILURE@@@
Running: git reset --hard origin/main
HEAD is now at 6ac44557d [SingleSource] Add variants with forced opts for vectorizer tests. (#368)
Running: git pull
Already up to date.
@@@BUILD_STEP configure test suite@@@
@@@HALT_ON_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[8484/8557] Linking CXX shared library lib/libFIRBuilder.so.23.0git
[8485/8557] Creating library symlink lib/libFIRBuilder.so
[8486/8557] Linking CXX shared library lib/libFIROpenMPSupport.so.23.0git
[8487/8557] Creating library symlink lib/libFIROpenMPSupport.so
[8488/8557] Linking CXX shared library lib/libFortranUtils.so.23.0git
[8489/8557] Creating library symlink lib/libFortranUtils.so
[8490/8557] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
[8491/8557] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
[8492/8557] Creating library symlink lib/libFIROpenACCSupport.so
[8493/8557] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/hip-third-party-libs-test/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/hip-third-party-libs-test/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/hip-third-party-libs-test/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[8494/8557] Linking CXX shared library lib/libFIROpenACCAnalysis.so.23.0git
[8495/8557] Linking CXX shared library lib/libFIRTestOpenACCInterfaces.so.23.0git
[8496/8557] Linking CXX shared library lib/libFIRCodeGen.so.23.0git
[8497/8557] Linking CXX shared library lib/libFlangOpenMPTransforms.so.23.0git
[8498/8557] Linking CXX executable bin/fir-lsp-server
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 107, in step
    yield
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 44, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/hip-third-party-libs-test/build/../llvm-zorg/zorg/buildbot/builders/annotated/hip-tpl.py", line 120, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/hip-third-party-libs-test/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder openmp-offload-libc-amdgpu-runtime running on omp-vega20-1 while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/22447

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --cmake-file=AMDGPULibcBot.cmake' (failure)
...
-- Performing Test OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION
-- Performing Test OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION - Success
-- Performing Test OPENMP_HAVE_FUNCTION_SECTIONS
-- Performing Test OPENMP_HAVE_FUNCTION_SECTIONS - Failed
-- Performing Test OPENMP_HAVE_DATA_SECTIONS
-- Performing Test OPENMP_HAVE_DATA_SECTIONS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/runtimes/runtimes-amdgcn-amd-amdhsa-bins
[4965/4977] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
-- Performing Test OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION
-- Performing Test OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION - Success
-- Performing Test OPENMP_HAVE_FUNCTION_SECTIONS
-- Performing Test OPENMP_HAVE_FUNCTION_SECTIONS - Failed
-- Performing Test OPENMP_HAVE_DATA_SECTIONS
-- Performing Test OPENMP_HAVE_DATA_SECTIONS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/runtimes/runtimes-amdgcn-amd-amdhsa-bins
[4965/4977] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib  -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib:"  lib/libLLVMSPIRVDesc.so.23.0git  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMAMDGPUDisassembler.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMSPIRVInfo.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMAMDGPUDesc.so.23.0git  lib/libLLVMAMDGPUInfo.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib && :
/usr/bin/ld: tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o: undefined reference to symbol '_ZN4llvm14identify_magicERKNS_5TwineERNS_10file_magicE'
/usr/bin/ld: /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib/libLLVMBinaryFormat.so.23.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=101.342329

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/35970

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
61.289 [1/9/2897] Linking CXX executable bin/llvm-exegesis
61.326 [1/8/2898] Linking CXX executable bin/llvm-ir2vec
61.385 [1/7/2899] Linking CXX executable bin/opt
67.632 [1/6/2900] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o
68.278 [1/5/2901] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o
68.759 [1/4/2902] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o
71.811 [1/3/2903] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o
73.922 [1/2/2904] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o
73.970 [1/1/2905] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
74.100 [0/1/2906] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=gold     -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/lib:"  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMNVPTXDesc.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMNVPTXInfo.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/lib && :
tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o:ProfiledBinary.cpp:function llvm::sampleprof::ProfiledBinary::load() [clone .localalias]:(.text._ZN4llvm10sampleprof14ProfiledBinary4loadEv+0x148): error: undefined reference to 'llvm::identify_magic(llvm::Twine const&, llvm::file_magic&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Apr 9, 2026

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/36110

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
63.430 [1/9/2897] Linking CXX executable bin/llvm-lto
63.432 [1/8/2898] Linking CXX executable bin/llvm-lto2
63.441 [1/7/2899] Creating library symlink lib/libLTO.so
68.873 [1/6/2900] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o
70.014 [1/5/2901] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o
70.091 [1/4/2902] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o
71.887 [1/3/2903] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o
75.002 [1/2/2904] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o
75.742 [1/1/2905] Building CXX object tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o
75.873 [0/1/2906] Linking CXX executable bin/llvm-profgen
FAILED: bin/llvm-profgen 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=gold     -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/CSPreInliner.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfileGenerator.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/MissingFrameInferrer.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib:/home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/lib:"  lib/libLLVMX86Desc.so.23.0git  lib/libLLVMNVPTXDesc.so.23.0git  lib/libLLVMX86Disassembler.so.23.0git  lib/libLLVMX86Info.so.23.0git  lib/libLLVMNVPTXInfo.so.23.0git  lib/libLLVMipo.so.23.0git  lib/libLLVMMCDisassembler.so.23.0git  lib/libLLVMProfileData.so.23.0git  lib/libLLVMSymbolize.so.23.0git  lib/libLLVMDebugInfoPDB.so.23.0git  lib/libLLVMDebugInfoDWARF.so.23.0git  lib/libLLVMObject.so.23.0git  lib/libLLVMMC.so.23.0git  lib/libLLVMCore.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/llvm-nvptx-nvidia-ubuntu/build/lib && :
tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o:ProfiledBinary.cpp:function llvm::sampleprof::ProfiledBinary::load() [clone .localalias]:(.text._ZN4llvm10sampleprof14ProfiledBinary4loadEv+0x148): error: undefined reference to 'llvm::identify_magic(llvm::Twine const&, llvm::file_magic&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

google-yfyang added a commit to google-yfyang/llvm-project that referenced this pull request Apr 10, 2026
google-yfyang added a commit that referenced this pull request Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PGO Profile Guided Optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants